import os
import sys
#
# Base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# # print(Base_dir)
# sys.path.insert(0, Base_dir)
from celery import Celery

# include =[] 元素是任务
app = Celery('MyCelery')

# 加载配置文件
app.config_from_object('celery_tasks.celeryconfig')
# 自动发现任务
app.autodiscover_tasks(['celery_tasks.tasks.sms.task.sms_code'])

# celery -A celery_tasks.main worker -l info -P eventlet